package com.example.decorator;

import lombok.extern.slf4j.Slf4j;

/**
 * 具体的装饰角色实现，负责给构件对象贴上附加责任
 */
@Slf4j
public class ConcrtetDecorator2 extends Deconrator {

    public ConcrtetDecorator2(Component component) {
        super(component);
    }

    @Override
    public void doSomething() {
        log.info("进入方法ConcrtetDecorator2  doSomething");
        super.doSomething();
        this.doOtherThing();
    }

    public void doOtherThing(){
        log.info("具体的装饰角色2");
    }
}
